<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>后台管理</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/webjars/bootstrap/4.4.1-1/css/bootstrap.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <link href="iconfont/iconfont.css" th:href="@{/iconfont/iconfont.css}" rel="stylesheet">

    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .info {
            float: left;
        }

        .pagination {
            float: right;
        }

        .add {
            float: left;
        }

        .navbar-form {
            float: right;
        }


        img {
            height: 20px;
            width: 20px;
        }

    </style>

</head>

<body>
<!--引入抽取的topbar-->
<!--模板名：会使用thymeleaf的前后缀配置规则进行解析-->
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0" >
    <a class="navbar-brand col-sm-3 col-md-2 mr-0 bg-dark" href="#">
        <h4 class=" text-light text-justify ">

            <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-person-vcard-fill text-light" viewBox="0 0 16 16">
                <path fill-rule="evenodd" d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm9 1.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5ZM9 8a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4A.5.5 0 0 1 9 8Zm1 2.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-1 2c0 .17-.014.337-.04.5H2a1 1 0 0 1-.984-.819C1.2 10.398 2.914 9 5 9c2.21 0 4 1.567 4 3.5ZM7 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"/>
            </svg>
            <sapn class="text-light">:</sapn>
            [[${session.loginUser}]]
        </h4>

    </a>

    <a class="navbar-brand col-sm-3 col-md-2 mr-0 bg-dark" href="#">
<!--        <div class="alert alert-warning alert-dismissible fade show" role="alert">-->
<!--            <strong> 登录成功！</strong>-->
<!--            <button type="button" class="close" data-dismiss="alert" aria-label="Close">-->
<!--                <span aria-hidden="true">&times;</span>-->
<!--            </button>-->
<!--        </div>-->
    </a>

    <input class="form-control form-control-dark w-100" type="text" aria-label="Search" placeholder="欢迎使用员工管理系统！"
           disabled>
    <ul class="navbar-nav px-3">
        <li class="nav-item text-nowrap">
            <!--            <a class="nav-link" href="#" th:href="@{/user/logout}">退出</a>-->
            <a class="nav-link" href="#" th:href="@{/user/logout}">登出</a>
        </li>
    </ul>
</nav>

<div class="container-fluid">
    <div class="row">
        <!--引入侧边栏-->
<!--        <div th:insert="commons/bar::#sidebar(activeUri='emps1')" th:class="text-hide"></div>-->
<!--        <div th:href="@{/emps1/}"></div>-->
        <div th:insert="commons/bar::#sidebar(activeUri='emps1')" th:class="text-hide"></div>


        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">


            <!--            测试-->
            <!--            <h2 class="add"><a class="btn btn-outline-success " href="emp" th:if="${session.loginUser.username}=='root'" th:href="@{/emp}">新增</a></h2>-->



            <div class="table-responsive">
                <table class="table table-striped table-sm table-bordered">
                    <thead>
                    <tr>
                        <th>员工编号</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>年龄</th>
                        <th>电话</th>
                        <th>毕业院校</th>
                        <th>工号</th>
                        <th>学历</th>
                        <th>...</th>

                    </tr>
                    </thead>
                    <tbody>

                    <tr th:each="emps:${emp}">
                        <td th:text="${emps.getId()}"></td>
                        <td th:text="${emps.getName()}"></td>
                        <td th:text="${emps.getAge()}"></td>
                        <td th:text="${emps.getGender()}"></td>
                        <td th:text="${emps.getPhone()}"></td>
                        <td th:text="${emps.getAddress()}"></td>
                        <td th:text="${emps.getWorkID()}"></td>
                        <td th:text="${emps.getDegree()}"></td>
                        <td>...</td>

                    </tr>
                    <!--<tr th:each="emps:${emp}">
                        <td>[[${emp.id}]]</td>
                        <td>[[${emp.name}]]</td>
                        <td>[[${emp.gender}]]</td>
                        >
                        <td>
                            <div th:if="${emp.age}>=35" th:text="${emp.age}" class="text-danger"></div>
                            <div th:if="${emp.age}<35" th:text="${emp.age}"></div>
                        </td>

                        <td>[[${emp.phone}]]</td>
                        <td>[[${emp.address}]]</td>

                    </tr>-->
                    </tbody>
                </table>



            </div>
        </main>
       
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/webjars/jquery/3.5.0/jquery.js}"></script>
<script type="text/javascript" th:src="@{/webjars/popper.js/1.14.3/popper.js}"></script>
<script type="text/javascript" th:src="@{/webjars/bootstrap/4.4.1-1/js/bootstrap.js}"></script>

<script type="text/javascript" th:src="@{/asserts/js/bootstrap-paginator.js}"></script>
<!-- Icons -->

<script>
    $(".deleteBtn").click(function () {
        //删除当前员工的
        $("#deleteEmpForm").attr("action", $(this).attr("del_uri")).submit();
        return false;
    });
</script>
</body>
</html>